/**
    @file interface.hpp
    @brief Interface between Ogre and Game content
*/
#ifndef PM3_INTERFACE_HPP
#define PM3_INTERFACE_HPP

#include <OgreSingleton.h>
#include <OgreSceneManager.h>
#include <Plugins/PCZSceneManager/OgrePCZSceneManager.h>

//! Pixelmaze game engine
namespace pm3 {

    /**
        @class INTERFACE
        @brief Interface between Ogre and Game content
    */
    class INTERFACE: public Ogre::Singleton<INTERFACE> {
    public:
            INTERFACE() {
                m_root = NULL;
                m_scene_mgr = NULL;
                m_render_window = NULL;
                m_world_node = NULL;
            }

            /**
                @brief Returns a pointer to Ogre root node
                @return Pointer to Ogre root node
            */
            inline Ogre::Root *get_root() const {
                return m_root;
            }

            /**
                @brief Returns a pointer to Ogre SceneManager
                @return Pointer to Ogre SceneManager
            */
            inline Ogre::PCZSceneManager *get_scenemgr() const {
                return m_scene_mgr;
            }

            /**
                @brief Returns a pointer to Ogre RenderWindow
                @return Pointer to Ogre RenderWindow
            */
            inline Ogre::RenderWindow *get_render_window() const {
                return m_render_window;
            }

            /**
                @brief Returns a pointer to the world node
                @return Pointer to World node
            */
            inline Ogre::PCZSceneNode *get_world_node() const {
                return m_world_node;
            }

            //! Ogre root node pointer
            Ogre::Root *m_root;
            //! Ogre scene manager pointer
            Ogre::PCZSceneManager *m_scene_mgr;
            //! Ogre render window pointer
		    Ogre::RenderWindow *m_render_window;
            //! Pointer to the world node
            Ogre::PCZSceneNode *m_world_node;
    };

    //! Interface global
    extern INTERFACE g_interface;
}

#endif

